package com.conditional.domain.v2;

/**
 *将这个条件表达式的每个分支放进一个子类的覆写函数中，然后将原始函数声明为抽象函数。
 * @author:         cong zhi
 * @createDate:     2022/5/6 10:27
 * @updateUser:     cong zhi
 * @updateDate:     2022/5/6 10:27
 * @updateRemark:   修改内容
 * @version:        v1.0
 */
public class Employee {


    private double monthlySalary;

    private double commission;

    private double bonus;


    private EmployeeType type;

    public double getMonthlySalary() {
        return monthlySalary;
    }


    public double getCommission() {
        return commission;
    }

    public double getBonus() {
        return bonus;
    }

    double payAmount() {
        return type.payAmount(this);
    }
}
